//
//  MOPlaceholderView.m
//  WCImApp
//
//  Created by alfie on 2019/11/19.
//  Copyright © 2019 WCImApp. All rights reserved.
//

#import "MOPlaceholderView.h"
#import <Masonry/Masonry.h>
#import "UIView+QAExtension.h"

@implementation MOPlaceholderView


#pragma mark -- UI
- (UIImageView *)imageView {
    if (!_imageView) {
        _imageView = [[UIImageView alloc] init];
        [self addSubview:_imageView];
        [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
            
            make.centerX.offset(0);
            make.centerY.offset(-45);
        }];
    }
    return _imageView;
}


- (UILabel *)tipLb {
    if (!_tipLb) {
        _tipLb = [UILabel new];
        _tipLb.font = WCIFontRegular(14);
        _tipLb.textColor = [UIColor assist_Text_color];
        _tipLb.textAlignment = NSTextAlignmentCenter;
        [self addSubview:_tipLb];
        [_tipLb mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.offset(0);
            make.centerY.offset(50);
        }];
    }
    return _tipLb;
}


- (UIButton *)reloadBtn {
    if (!_reloadBtn) {
        _reloadBtn = [UIButton new];
        [_reloadBtn setTitle:@"刷新" forState:UIControlStateNormal];
        [_reloadBtn setTitleColor:UIColor.whiteColor forState:0];
        [_reloadBtn setBackgroundColor:[UIColor main_Color]];
        [_reloadBtn.titleLabel setFont:WCIFontRegular(14)];
        ViewRadius(_reloadBtn, 5);
        [self addSubview:_reloadBtn];
        [_reloadBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            
            make.centerX.offset(0);
            make.top.equalTo(self.tipLb.mas_bottom).offset(15);
            make.width.offset(80);
            make.height.offset(30);
        }];
        
    }
    return _reloadBtn;
}



@end
